home *** CD-ROM | disk | FTP | other *** search
/ Developer Helper 1: Phil & Dave's Excellent CD / Excellent CD HFS.raw / HyperCard / HyperCard 1.2.2 International / HyperCard Italian (T-1.2.2) / Altri Stack / Rapporto Vendite / card_4211.txt < prev    next >
Text File  |  1988-11-22  |  2KB  |  82 lines

  1. -- card: 4211 from stack: in
  2. -- bmap block id: 4090
  3. -- flags: 0000
  4. -- background id: 2620
  5. -- name: 
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: A002
  11. -- rect: left=433 top=274 right=297 bottom=509
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Aggiorna
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   put the userLevel into saveLevel
  23.   if the userLevel < 3 then set userLevel to 3 -- "Disegno"
  24.   if the userLevel < 3 then exit mouseUp
  25.   clearScreen
  26.   put empty into background field "totale"
  27.   reset paint
  28.   choose oval tool
  29.   set lineSize to 2
  30.   set filled to true
  31.  
  32.   put frameLeft() into horiz
  33.   put maxLine(field "Dati") into maxValue
  34.   set cursor to 4 -- watchCursor
  35.  
  36.   put the number of lines in field "Dati" into coins
  37.   if coins > 10 then
  38.     answer "Saranno disegnati solo i primi 10 dati." with "OK"
  39.     put 10 into coins
  40.   end if
  41.  
  42.   repeat with i = 1 to coins
  43.     get line i of field "dati"
  44.     if it is not empty then
  45.       put round(frameHeight()/8.2 * it/maxValue) into coinCount
  46.       set pattern to 13
  47.       drawCoins horiz,frameBottom()-2,coinCount
  48.     end if
  49.     add 40 to horiz
  50.   end repeat
  51.   reset paint
  52.   choose browse tool
  53.   set userLevel to saveLevel
  54. end mouseUp
  55.  
  56. on drawCoins left,bottom,howMany
  57.   put bottom into y
  58.   repeat with i = 1 to howMany
  59.     subtract 8 from y
  60.     drag from left,y to left+30,y+10
  61.   end repeat
  62. end drawCoins
  63.  
  64.  
  65.  
  66. -- part contents for background part 5
  67. ----- text -----
  68. 10
  69. 20
  70. 30
  71. 54
  72. 52
  73. 40
  74. 50
  75. 70
  76. 90
  77. 120
  78.  
  79.  
  80. -- part contents for background part 11
  81. ----- text -----
  82. MegaCorp: Profitti per anno